This invention generally relates to the field of communication systems and, more particularly, to the exchange of data using the I.sup.2 C bidirectional serial protocol.
The I.sup.2 C protocol can be used for communicating data within a system having at least one microcomputer and other peripheral devices, e.g., memories and I/O expanders. The I.sup.2 C protocol is especially useful when the cost of connecting various devices within the system must be minimized, and high speed data transfer is not required.
In particular, the I.sup.2 C protocol is a two-pin, bidirectional serial protocol that uses a data signal on one pin and a clock signal on the other pin. The protocol is symmetrical with respect to each of the pins, so that the same rules apply to bidirectional transfer of data information through the data pin as apply to bidirectional transfer of clock information through the clock pin. For a more thorough description of the I.sup.2 C protocol, see, e.g., RF/Wireless Communications Data Handbook, Philips Semiconductors, copyright 1992, pages 896-914, which is hereby incorporated by reference.
According to the I.sup.2 C protocol, communications devices are connected to a bidirectional data line and to a bidirectional clock line to form a network. Each bidirectional line is pulled to a logical HIGH level, for example by a pullup resistor connected at one end to the bidirectional line and connected at the other end to voltage source having a voltage corresponding to the logical HIGH level. Each of the communications devices outputs either a floating signal or a logical LOW signal onto the bidirectional line.
When a communications device outputs a floating signal, in effect the communications device is disconnected from the bidirectional line with respect to output. A floating output does not alter a voltage present on the bidirectional line.
Thus, when one or more communications devices outputs a logical LOW signal onto the bidirectional line, for example by connecting the bidirectional line to ground, and the remaining communications devices output a floating signal, a logical LOW signal is present on the bidirectional line. When all of the communications devices output a floating signal, the pullup resistor connected to the bidirectional line and to the voltage source causes the voltage of the voltage source to be present on the bidirectional line. This situation is known as a "wired AND" arrangement, and is required by the I.sup.2 C protocol.
Two devices can communicate with each other according to the I.sup.2 C protocol only if each device can receive signals from the other device.
Furthermore, the I.sup.2 C protocol specifies that a device that initiates communication with another device is a "master", and the device that responds is a "slave". Because of the arbitration scheme specified in the I.sup.2 C protocol, a "master" must be able to receive signals from all other communications devices that act as masters and use the same bidirectional lines. Alternatively, when a first communications device cannot receive signals from a second communications device, an additional mechanism can be provided to prevent the first and second communications devices from acting as masters at the same time. For example, when it is desired that one of the first and second communications devices act as a master, the other of the first and second communications devices can either be a) isolated or removed from the network, or b) enabled to act only as a slave.
FIG. 1 shows a conventional circuit wherein two communications devices 198, 199 are connected so that they can communicate with each other according to the I.sup.2 C protocol.
As shown in FIG. 1, the two communications devices 198, 199 are connected to a bidirectional data line 396 by lines SDATA1 and SDATA2, and to a bidirectional clock line 397 by lines SCLK1 and SCLK2.
Clock signals are transmitted and received through the SCLK1 and SCLK2 lines, and data signals are transmitted and received through the SDATA1 and SDATA2 lines.
Each of the communications devices 198, 199 has an operating voltage of V.sub.DD. Thus, each of the communications devices 198, 199 expects a logical HIGH signal on the SCLK1, SCLK2, SDATA1 and SDATA2 lines to have a voltage level corresponding to V.sub.DD.
As shown in FIG. 1, the SCLK1.sub.-- out line of the communications device 199 is connected to a device such as a field-effect transistor (FET) having a drain connected to ground and having a source connected to the SCLK1 line and therefore to the bidirectional clock line 397. Accordingly, activation of the SCLK1.sub.-- out line turns the FET ON and connects the bidirectional clock line 397 to ground and pulls the voltage on the bidirectional clock line 397 to a ground potential.
The communications device 198 has a similar arrangement with respect to its SCLK2.sub.-- out line, which when activated also pulls the voltage on the bidirectional clock line 397 to a ground potential. In this way, either of the communications devices 198, 199 can pull the bidirectional clock line 397 to a ground potential.
In the communications device 199, the SCLK1 line is also connected to an input of a buffer 700. An output of the buffer 700 is connected to the SCLK1.sub.-- in line. Thus, the SCLK1.sub.-- in line reflects whatever logical signal is represented on the bidirectional clock line 397. For example, a ground potential on the bidirectional clock line 397 would represent a logical LOW, and a voltage of V.sub.DD on the bidirectional clock line 397 would represent a logical HIGH.
The SCLK2.sub.-- out, SCLK2.sub.-- in, DATA1.sub.-- out, DATA1.sub.-- in, DATA2.sub.-- out, and DATA2.sub.-- in lines are configured in the same way as the SCLK1.sub.-- out and SCLK1.sub.-- in lines, and operate in the same fashion with similar effects.
Conventional systems that use the I.sup.2 C protocol contain communications devices that all have the same operating voltage. "Operating voltage" as used in this document refers to a specified voltage for a particular device that corresponds to a voltage of a logical HIGH signal for the particular device. In certain applications, it may be desirable to use the I.sup.2 C protocol for communications devices having different operating voltages. Typical solutions for multiple voltage levels use bidirectional voltage level shifters.
However, bidirectional level shifters generally cannot be used to transfer data in a system using the I.sup.2 C protocol. This is because transmitting signals in different directions through a bidirectional level shifter requires that the transmission direction of a signal be known at any given time so that the bidirectional level shifter will transmit the signal in the proper direction. According to the I.sup.2 C protocol, the signal transmission direction is unknown until after data transmission has already begun. Consequently, using bidirectional level shifters to transmit signals in different directions according to the I.sup.2 C protocol is problematic, and the problem of how to connect communications devices having different operating voltages remains.